<?php
/**
 *
 * 版权所有：河南常新宏达网络科技<www.hncxhd.com>
 * 作    者：zxl
 * 日    期：2017-2-10
 * 版    本：1.0.0
 * 功能说明：文章控制器。
 *
 **/

namespace Admin\Controller;
use Vendor\Tree;

class StudentController extends ComController
{

    public function add()
    {

        $category = M('category')->field('id,pid,name')->order('o asc')->select();
        $tree = new Tree($category);
        $str = "<option value=\$id \$selected>\$spacer\$name</option>"; //生成的形式
        $category = $tree->get_tree(0, $str, 0);
        $this->assign('category', $category);//导航
        $this->display('form');
    }

    public function index($sid = 0, $p = 1)
    {

        $p = intval($p) > 0 ? $p : 1;
        $article = M('article');
        $pagesize = 20;#每页数量
        $offset = $pagesize * ($p - 1);//计算记录偏移量
        $prefix = C('DB_PREFIX');
        $sid = isset($_GET['sid']) ? $_GET['sid'] : '';
        $keyword = isset($_GET['keyword']) ? htmlentities($_GET['keyword']) : '';
        $order = isset($_GET['order']) ? $_GET['order'] : 'DESC';
        $where = '1 = 1 ';
        if ($sid) {
            $sids_array = category_get_sons($sid);
            $sids = implode(',',$sids_array);
            $where .= "and {$prefix}article.sid in ($sids) ";
        }
        if ($keyword) {
            $where .= "and {$prefix}article.title like '%{$keyword}%' ";
        }
        //默认按照时间降序
        $orderby = "t desc";
        if ($order == "asc") {

            $orderby = "t asc";
        }
        //获取栏目分类
        $category = M('category')->field('id,pid,name')->order('o asc')->select();
        $tree = new Tree($category);
        $str = "<option value=\$id \$selected>\$spacer\$name</option>"; //生成的形式
        $category = $tree->get_tree(0, $str, $sid);
        $this->assign('category', $category);//导航


        $count = $article->where($where)->count();
        $list = $article->field("{$prefix}article.*,{$prefix}category.name")->where($where)->order($orderby)->join("{$prefix}category ON {$prefix}category.id = {$prefix}article.sid")->limit($offset . ',' . $pagesize)->select();

        $page = new \Think\Page($count, $pagesize);
        $page = $page->show();
        $this->assign('list', $list);
        $this->assign('page', $page);
        $this->display();
    }

    public function del()
    {

        $aids = isset($_REQUEST['aids']) ? $_REQUEST['aids'] : false;
        if ($aids) {
            if (is_array($aids)) {
                $aids = implode(',', $aids);
                $map['aid'] = array('in', $aids);
            } else {
                $map = 'aid=' . $aids;
            }
            if (M('article')->where($map)->delete()) {
                addlog('删除文章，AID：' . $aids);
                $this->success('恭喜，文章删除成功！');
            } else {
                $this->error('参数错误！');
            }
        } else {
            $this->error('参数错误！');
        }

    }

    public function edit($aid)
    {

        $aid = intval($aid);
        $article = M('article')->where('aid=' . $aid)->find();
        if ($article) {

            $category = M('category')->field('id,pid,name')->order('o asc')->select();
            $tree = new Tree($category);
            $str = "<option value=\$id \$selected>\$spacer\$name</option>"; //生成的形式
            $category = $tree->get_tree(0, $str, $article['sid']);
            $this->assign('category', $category);//导航

            $this->assign('article', $article);
        } else {
            $this->error('参数错误！');
        }
        $this->display('form');
    }

    public function update($aid = 0)
    {

        $aid = intval($aid);
        $data['sid'] = isset($_POST['sid']) ? intval($_POST['sid']) : 0;
        $data['title'] = isset($_POST['title']) ? $_POST['title'] : false;
        $data['seotitle'] = isset($_POST['seotitle']) ? $_POST['seotitle'] : '';
        $data['keywords'] = I('post.keywords', '', 'strip_tags');
        $data['description'] = I('post.description', '', 'strip_tags');
        $data['content'] = isset($_POST['content']) ? $_POST['content'] : false;
        $data['thumbnail'] = I('post.thumbnail', '', 'strip_tags');
        $data['t'] = time();
        if (!$data['sid'] or !$data['title'] or !$data['content']) {
            $this->error('警告！文章分类、文章标题及文章内容为必填项目。');
        }
        if ($aid) {
            M('article')->data($data)->where('aid=' . $aid)->save();
            addlog('编辑文章，AID：' . $aid);
            $this->success('恭喜！文章编辑成功！');
        } else {
            $aid = M('article')->data($data)->add();
            if ($aid) {
                addlog('新增文章，AID：' . $aid);
                $this->success('恭喜！文章新增成功！');
            } else {
                $this->error('抱歉，未知错误！');
            }

        }
    }
    //省级生源
    public function province(){
    	
		// $p = isset($_GET['p']) ? intval($_GET['p']) : '1';
		// $pagesize = 20;#每页数量
        // $offset = $pagesize * ($p - 1);//计算记录偏移量
        // $count = M('xs_dc_sy_jyxx')->count();
        // $UStudents = M('xs_dc_sy_jyxx')->select();
        // print_r($UStudents);
        // exit;
        // $page = new \Think\Page($count, $pagesize);
        // $page = $page->show();
		// $this->assign('UStudents',$UStudents);
		// $this->assign('page',$page);
         $sql="SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cx_xs_dc_sy_jyxx' AND TABLE_SCHEMA ='jyxxgl'";
          $zs=M()->query($sql);
          $aa=[];
          $bb=array_values($zs);
          foreach ($bb as $key => $value) {
              // print_r($value['column_comment']);
               array_push($aa,$value['column_comment']);
          }
             array_unshift($aa,'');
             print_r($aa);
             exit;
          // $cc=['1','2'];
          // print_r($cc);
          // exit;
          // $this->assign('aa',$aa);
		   $this->display();
    }
    public function getProvinceData(){
          $UStudents = M('xs_dc_sy_jyxx')->select();
         $count = M('xs_dc_sy_jyxx')->count();
          
          $this->ajaxReturn($UStudents);
           
    }
     public function Padd(){
    	$user=$_GET;
    	$isuser=M('xs_dc_sy_jyxx')->where("XH=$user[XH] and SFZHM=$user[SFZHM]")->find();
    	if($isuser){
    		echo "0";
    	}else{
	    	$res=M('xs_dc_sy_jyxx')->add($user);
    	}
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    	//$this->display();
    }
    //校级生源修改修改
    public function Pedit(){
    	$user=M('xs_dc_sy_jyxx')->where('XH='.$_GET['id'])->find();
    	$this->assign('user',$user);
    	$this->display();
    }
    //校级生源保存修改
	public function Psave(){
		$user=$_GET;
    	$user=array_change_key_case($user,CASE_UPPER);
	    $res=M('xs_dc_sy_jyxx')->data($user)->where("XH=$user[XH]")->fetchSql(true)->select();
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    }
    //删除校级学生信息
    public function Pdel(){
	    	$ids = isset($_REQUEST['ids'])?$_REQUEST['ids']:false;
	        if($ids){
				if(is_array($ids)){
					$ids = implode(',',$ids);
					$map='XH in ('.$ids.')';
			    }else{
			     $map = 'XH='.$ids;
			 	}
	         $delrec=M('xs_dc_sy_jyxx')->where($map)->delete();
	         addlog('删除了'.$delrec.'个校级生源');
	       	if($delrec){
					$this->success('恭喜，'.$delrec.'个校级生源删除成功！',U('UStudents'));
			 	}else{
					
					$this->error('参数错误！');
			 	}
			}
    }
    
    
    //校级学生
	public function UStudents(){
		
		$p = isset($_GET['p']) ? intval($_GET['p']) : '1';
		$pagesize = 20;#每页数量
        $offset = $pagesize * ($p - 1);//计算记录偏移量
        $count = M('xs_sy_jbgr')->count();
        $UStudents = M('xs_sy_jbgr')->order('XH asc')->limit($offset . ',' . $pagesize)->select();
        $page = new \Think\Page($count, $pagesize);
        $page = $page->show();
		$this->assign('UStudents',$UStudents);
		$this->assign('page',$page);
		$this->display();
	}
    //添加校级学生信息
    public function Uadd(){
    	$user=$_GET;
    	$user=array_change_key_case($user,CASE_UPPER);
    	//$user=array_change_key_case($user,CASE_UPPER);
    	$isuser=M('xs_sy_jbgr')->where("XH=$user[XH] and SFZHM=$user[SFZHM]")->find();
    	
    	if($isuser){
    		echo "0";
    	}else{
	    	$res=M('xs_sy_jbgr')->add($user);
    	}
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    	//$this->display();
    }
    
    public function Uedit(){
    	
    	if($_SESSION[aa]){
    	$map.= $_SESSION[aa];
    	}
    	$user=M('xs_sy_jbgr')->where('XH='.$_GET['id'])->find();
    	$this->assign('user',$user);
    	$this->display();
    }
    
	public function Usave(){
		$user=$_GET;
    	$user=array_change_key_case($user,CASE_UPPER);
	    $res=M('xs_sy_jbgr')->data($user)->where("XH=$user[XH]")->save();
    	 
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    }
    //删除校级学生信息
    public function Udel(){
	    $ids = isset($_REQUEST['ids'])?$_REQUEST['ids']:false;
	        if($ids){
				if(is_array($ids)){
					$ids = implode(',',$ids);
					$map='XH in ('.$ids.')';
				}else{
				     $map = 'XH='.$ids;
				}
		        $delrec=M('xs_sy_jbgr')->where($map)->delete();
		        addlog('删除了'.$delrec.'个校级生源');
		       	if($delrec){
					$this->success('恭喜，'.$delrec.'个校级生源删除成功！',U('UStudents'));
				 }else{
					$this->error('参数错误！');
				 }
			}
    }
    
    public function updatestudent(){
    	$date=$_POST;
    	$aa=11;
    	if ($aa) {
            addlog('添加校级学生信息，ID：' . $aa);
            $this->success('恭喜！添加校级学生信息成功！');
         } else {
            $this->error('抱歉，未知错误！');
         }
    	
    }
    //就业信息
    public function jyxx(){
    	
		$p = isset($_GET['p']) ? intval($_GET['p']) : '1';
		$pagesize = 20;#每页数量
        $offset = $pagesize * ($p - 1);//计算记录偏移量
        $count = M('xs_dc_sy_jyxx')->count();
        $jyxx = M('xs_dc_sy_jyxx')->order('XH asc')->limit($offset . ',' . $pagesize)->select();
        $page = new \Think\Page($count, $pagesize);
        $page = $page->show();
		$this->assign('jyxx',$jyxx);
		$this->assign('page',$page);
		$this->display();
    }
     public function jyxxadd(){
    	$user=$_GET;
    	$isuser=M('xs_dc_sy_jyxx')->where("XH=$user[XH] and SFZHM=$user[SFZHM]")->find();
    	if($isuser){
    		echo "0";
    	}else{
	    	$res=M('xs_dc_sy_jyxx')->add($user);
    	}
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    	//$this->display();
    }
    //就业信息修改修改
    public function jyxxedit(){
    	$user=M('xs_dc_sy_jyxx')->where('XH='.$_GET['id'])->find();
    	$this->assign('user',$user);
    	$this->display();
    }
    //就业信息保存修改
	public function jyxxsave(){
		$user=$_GET;
    	$user=array_change_key_case($user,CASE_UPPER);
	    $res=M('xs_dc_sy_jyxx')->data($user)->where("XH=$user[XH]")->fetchSql(true)->select();
    	if($res){
    		echo "1";
    	}else{
    		echo "2";
    	}
    }
    //删除就业信息
    public function jyxxdel(){
	    	$ids = isset($_REQUEST['ids'])?$_REQUEST['ids']:false;
	        if($ids){
				if(is_array($ids)){
					$ids = implode(',',$ids);
					$map='XH in ('.$ids.')';
			    }else{
			     $map = 'XH='.$ids;
			 	}
	         $delrec=M('xs_dc_sy_jyxx')->where($map)->delete();
	         addlog('删除了'.$delrec.'个就业信息');
	       	if($delrec){
					$this->success('恭喜，'.$delrec.'个就业信息删除成功！',U('UStudents'));
			 	}else{
					
					$this->error('参数错误！');
			 	}
			}
    }
    public function addexcel(){
    	
    	$this->display();
    }
	public function upexcel(){
		
		import('ORG.Util.ExcelToArrary');//导入excelToArray类
		
		if (! empty ( $_FILES ['file_stu'] ['name'] )){
			$tmp_file = $_FILES ['file_stu'] ['tmp_name'];
			$file_types = explode ( ".", $_FILES ['file_stu'] ['name'] );
			$file_type = $file_types [count ( $file_types ) - 1];
			/*判别是不是.xls文件，判别是不是excel文件*/
			if (strtolower ( $file_type ) != "xls")              
			{
				$this->error ( '不是Excel文件，重新上传' );
			}
			
			/*设置上传路径*/
			$savePath = './Public/Uploads/excel/';
			/*以时间来命名上传的文件*/
			$str = date ( 'Ymdhis' ); 
			$file_name = $str . "." . $file_type;
			/*是否上传成功*/
			if (! copy ( $tmp_file, $savePath . $file_name )) 
			{
				$this->error ( '上传失败' );
			}		  
		}
		$table=$_REQUEST['table'];
		$data=import_excel('./Public/Uploads/excel/'.$file_name);
		
	
		if($table=='U'){
			$table="xs_sy_jbgr";
		}elseif ($table=='P'){
			$table="xs_dc_sy_jyxx";
		}
		
		foreach ($data['1'] as $k=>$v){
				$b=explode ('|',$v);
				$c[$k]=$b[1];
				}
		foreach ($data as $k=>$v){
				if($k>1){
					$ccc=array_combine($c,$v);
				    $res =-1;//操作的返回值
				    try{
				     $res=M("$table")->add($ccc);
				    }catch(\Exception $e){
				     if($e->getCode()==23000){
				       $this->error('添加失败');
				       die();
				     }
				   }
				}
		}
		$count=count($data)-1;
		if($table=='U'){
			$table="xs_sy_jbgr";
			addlog("导入了".$count."校级生源！");
		}elseif ($table=='P'){
			$table="xs_dc_sy_jb";
			addlog("导入了".$count."省级生源！");
		}
		
		$this->success('恭喜！添加信息成功！');
	}
	public function Uexportxsstpl(){
      	
         $sql="SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cx_xs_sy_jbgr' AND TABLE_SCHEMA ='jyxxgl'";
         $zs=M()->query($sql);
      
      	//导入PHPExcel类库         
        $filename="student";
        $this->exportExcelTpl($filename,$zs);
     }
	public function Uexportxss(){
        $sql="SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cx_xs_sy_jbgr' AND TABLE_SCHEMA ='jyxxgl'";
        $zs=M()->query($sql);
        $data=M('xs_sy_jbgr')->where('1=1')->select();
      	//导入PHPExcel类库         
        $filename="student";
        $this->Uexcel($filename,$zs,$data);
     }
	protected function Uexcel($expTitle,$expCellName,$expData){
		//创建对象
		 $this->importPhpexecl();
         $excel =  new \PHPExcel();
		//Excel表格式
         $cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM','AN','AO','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ','BA','BB','BC','BD','BE','BF','BG','BH','BI','BJ','BK','BL','BM','BN','BO','BP','BQ','BR','BS','BT','BU','BV','BW','BX','BY','BZ');
		//表头数组
			foreach ($expCellName as $k=>$v){
              	$expCellName[$k]=$v[column_comment]."|".$v[column_name];
              }
         $tableheader = $expCellName;
		//填充表头信息
         for ($i = 0; $i < count($tableheader); $i++)
         {
                 $excel->getActiveSheet()->setCellValue("$cellName[$i]1", "$tableheader[$i]");
         }
		//填充表格信息
         for ($i = 2; $i <= count($expData) + 1; $i++)
         {
                 $j = 0;
                 foreach ($expData[$i - 2] as $key => $value)
                 {
                         $excel->getActiveSheet()->setCellValue("$cellName[$j]$i", "$value");
                         $j++;
                 }
         }
         //创建Excel输入对象
         $write = new \PHPExcel_Writer_Excel5($excel);
         header("Pragma: public");
         header("Expires: 0");
         header("Cache-Control:must-revalidate, post-check=0, pre-check=0");
         header("Content-Type:application/force-download");
         header("Content-Type:application/vnd.ms-execl");
         header("Content-Type:application/octet-stream");
         header("Content-Type:application/download");
         header('Content-Disposition:attachment;filename="'.$expTitle.'.xls"');
         header("Content-Transfer-Encoding:binary");
         $write->save('php://output');
     }
     
	public function Pexportxsstpl(){
      	
         $sql="SELECT COLUMN_NAME,COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'cx_xs_dc_sy_jyxx' AND TABLE_SCHEMA ='jyxxgl'";
         $zs=M()->query($sql);
      
      	//导入PHPExcel类库         
        $filename="student";
        $this->exportExcelTpl($filename,$zs);
     }
	
	protected function exportExcelTpl($expTitle,$expCellName){
         $this->importPhpexecl();
        if(empty($expCellName)||!is_array($expCellName)){                 
            die("提交的数据必须是数组");
        }             
        $sheets=$expTitle;
        $expTitle.="_{$expTitle}tpl.xls"; 
        $cellNum = count($expCellName);
        $objPHPExcel = new \PHPExcel();
        $objPHPExcel->setActiveSheetIndex(0); //设置第一个工作表为活动工作表
        $objPHPExcel->getActiveSheet()->setTitle($sheets); //设置工作表名称
        $cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','AA','AB','AC','AD','AE','AF','AG','AH','AI','AJ','AK','AL','AM','AN','AO','AP','AQ','AR','AS','AT','AU','AV','AW','AX','AY','AZ','BA','BB','BC','BD','BE','BF','BG','BH','BI','BJ','BK','BL','BM','BN','BO','BP','BQ','BR','BS','BT','BU','BV','BW','BX','BY','BZ');
        $objPHPExcel->getActiveSheet()->getStyle('A1:'.$cellName[$cellNum-1].'1')->getFont()->setSize(10);//字体
         //设置单元格字体式样
        $objPHPExcel->getActiveSheet()->getStyle('A1:'.$cellName[$cellNum-1].'1')->getFont()->setBold(true);//粗体
        //背景色填充
        $objPHPExcel->getActiveSheet()->getStyle('A1:'.$cellName[$cellNum-1].'1')->getFill()->getStartColor()->setARGB('FFB8CCE4');
        //输出备注内容
        for($i=0;$i<$cellNum;$i++){
        	$objPHPExcel->getActiveSheet()->getColumnDimension($cellName[$i])->setAutoSize(true); 
            $objPHPExcel->setActiveSheetIndex(0)->setCellValue($cellName[$i].'1', $expCellName[$i]['column_comment']."|".$expCellName[$i]['column_name']);
            $objPHPExcel->getActiveSheet()->getStyle($cellName[$i].'1')->getAlignment()->setWrapText(true);//自动换行
        }
       
    
        $expTitle = iconv("utf-8", "gb2312", $expTitle);             
        //设置活动单指数到第一个表,所以Excel打开这是第一个表             
        $objPHPExcel->setActiveSheetIndex(0);
        $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');  
        header('pragma:public');
        header('Content-type:application/vnd.ms-excel;charset=utf-8;name="'.$expTitle.'"');
        header("Content-Disposition:attachment;filename=$expTitle");//attachment新窗口打印inline本窗口打印
        $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); 
        //$objWriter->save('./Public/exports/'.$expTitle);
        $objWriter->save('php://output');
        exit;   
    }
    
	
	
	public function importPhpexecl(){
	    //////////////引入phpexecl类
	    import("ORG.Util.PHPExcel");        
	    import("ORG.Util.PHPExcel.Writer.Excel5");         
	    import("ORG.Util.PHPExcel.IOFactory.php");
	
	  }
	  
	  
	  

//    <!--原创-->
//     function joinarmy(){
//	  <!--ace admin-->

    function join(){ 

		$p = isset($_GET['p']) ? intval($_GET['p']) : '1';
		$log = M('xs_sy_jbgr');
     $pagesize = 10;#每页数量
     $offset = $pagesize * ($p - 1);//计算记录偏移量
    
        if(I('get.XH')){
            $map['XH'] =array('like',I('get.XH')); 
        }
        if(I('get.XM')){
             $map['XM'] =array('like',I('get.XM')); 
        }
        if(I('get.XBDM')){
             $map['XBDM'] =array('like',I('get.SFZH'));
        }
        if(I('get.SJQD')){
              $map['RXSJ'] =array('between',I('get.SJQD').",".I('get.SJZD')); 
        }

        
         if(I('get.')){     
              //需要查询数据
         // $infolist = $log->where($map)->limit($offset . ',' . $pagesize)->fetchSQL(true)->select();
      $infolist = $log->where($map)->limit($offset . ',' . $pagesize)->select(); 
         // echo $infolist;
         // return false;
          $this->assign(I('get.'));
         $count = $log->where($map)->count();
            
         }else{
          //用于获取所要添加的字段
          // if(I('get.')){
          //    $this->assign($getarr);
          // } 
          $count = $log->count();
          $infolist = $log->limit($offset . ',' . $pagesize)->select();
             }
        // 需要查询的字段功能
      $fieldlist=$log->query("DESC cx_xs_sy_jbgr");
         // $arr=array();
         // foreach ($fieldList as $key => $value) {
         //        array_push($arr,$value['field']);
         // }
//		      print_r($count);
     $page = new \Think\Page($count, $pagesize);
     $page = $page->show();
     $this->assign('infolist', $infolist);
     $this->assign('page', $page);
     $this->assign('fieldlist', $fieldlist);
   	 	
		     $this->display();
  }

       // 修改,优化数据表格
       public function addDept(){
            $log = M('xs_sy_jbgr');     
            $res=I('get.');
            // print_r($res);
            // exit;
  
            // $data = array('status' =>200,'data'=>$res );
            $result = $log->add($res);
             
         if($result){
            //设置成功后跳转页面的地址，默认的返回页面是$_SERVER['HTTP_REFERER']
            $this->success('新增成功', '/Admin/Student/join');
        } else {
            //错误页面的默认跳转页面是返回前一页，通常不需要设置
            $this->error('新增失败');
        }
           // $this->ajaxReturn($arrayName);

       }

       	 public function delDept(){
            $log = M('xs_sy_jbgr');          
            $xh=I('get.ID'); 
            // echo $xh;
            $map['XH']=array('in',$xh);
            $res=$log->where($map)->delete();
            // $res=$log->where('XH="'.I('get.ID').'"')->delete();
            // echo $res;
             if($res){
             //        //设置成功后跳转页面的地址，默认的返回页面是$_SERVER['HTTP_REFERER']
                    $this->success('删除成功', '/Admin/Student/join');
                } else {
             //        //错误页面的默认跳转页面是返回前一页，通常不需要设置
                    $this->error('删除失败');
                }
         
          }

          //获取数据表中的所有字段名称
          public function test(){
             $log = M('xs_sy_jbgr');          
             $fieldList=$log->query("DESC cx_xs_sy_jbgr");
             // $arr=array();
             // foreach ($fieldList as $key => $value) {
             //        array_push($arr,$value['field']);
             // }
             // print_r($arr);
             print_r($fieldList);
          } 

}